﻿<!--管理菜系列表-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<!-- 包含公共的JSP代码片段 -->
<title>锐颜酒家点餐平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/detail/style/js/jquery.js"></script>
<script type="text/javascript" src="/detail/style/js/page_common.js"></script>
<link href="/detail/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/detail/style/css/index_1.css" />
	<link rel="icon" type="image/x-icon" href="/favicon.ico" />

	<!--内嵌式的JS-->
	<script type="text/javascript">
		//跳转页面
		function toUpdate(id)
		{
			location.href = '/toUpdate/' + id;
		}

		//删除或者激活
		function delOrActive(del, id)
		{
			if (del === 0) //删除
			{
				if (confirm('您确定要删除?'))
				{
					location.href = '/foodTypeDelete/' + id;
				}
			}else if (del === 1) //激活
			{
				if (confirm('您确定要激活?'))
				{
					location.href = '/foodTypeActive/' + id;
				}
			}
		}

	</script>

</head>
<body>
	<!-- 页面标题 -->
	<div id="TitleArea">
		<div id="TitleArea_Head"></div>
		<div id="TitleArea_Title">
			<div id="TitleArea_Title_Content">
				<img border="0" width="13" height="13"
					src="/detail/style/images/title_arrow.gif" /> 菜系列表
			</div>
		</div>
		<div id="TitleArea_End"></div>
	</div>
	<!-- 过滤条件 -->
	<div id="QueryArea">
		<form action="/foodTypeQueryList" method="post">
			<input type="hidden" name="method" value="search">
			<input type="text" name="keyword" th:value="${keyword}" placeholder="请输入菜系名称">
			<input type="submit" value="搜索">
		</form>
	</div>

	<!-- 主内容区域（数据列表或表单显示） -->
	<div id="MainArea">
		<table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
			<!-- 表头-->
			<thead>
				<tr align="center" valign="middle" id="TableTitle">
					<td>菜系编号</td>
					<td>菜系名称</td>
					<td>操作</td>
				</tr>
			</thead>
			<!--显示数据列表 -->
			<tbody id="TableData">
				<tr class="TableDetail1" th:each="foodType, foodTypesStart: ${foodTypes}">
					<td align="center" th:text="${foodTypesStart.count}"></td>
					<td align="center" th:text="${foodType.name}"></td>
					<td align="center">
						<a href="javascript:void(0);" th:onclick="|toUpdate(${foodType.id})|" class="FunctionButton">更新</a>
						<a href="javascript:void(0);" th:onclick="|delOrActive(${foodType.del}, ${foodType.id})|" class="FunctionButton" th:text="${foodType.del == 0 ? '删除' : '激活'}"></a>
					</td>
				</tr>
			</tbody>
		</table>
		<!-- 其他功能超链接 -->
		<div id="TableTail" align="center">
			<div class="FunctionButton">
				<a href="/page_saveFoodType">添加</a>
			</div>
		</div>
	</div>
</body>
</html>
